import Vue from 'vue'
import App from './App.vue'
import router from './router'
// 导入富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'


import './plugins/element.js'
//导入全局样式表
import './assets/css/global.css'
//导入axios,并配置
import axios from 'axios'
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
// axios.defaults.baseURL = 'http://127.0.0.1:3007'
Vue.prototype.$http = axios
// 请求拦截器拦截器
axios.interceptors.request.use((config)=>{
  config.headers.Authorization = sessionStorage.getItem('TOKEN')
  return config
})

// 引入表格组件用在 home->categories->index.vue
import TreeTable from 'vue-table-with-tree-grid'
Vue.component('tree-table',TreeTable)
Vue.use(VueQuillEditor)

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
